import 'package:event_bus/event_bus.dart';
import 'package:rfid/entity/reader_entity.dart';

enum Task { borrowWithDoor, borrowWithoutDoor, toMine,addFace ,register}


class CurrentTaskEntity{


  String? uid;
  String? uName;
  int offset = 0;
  Task? task;
  // bool isSet = false;
  bool needCheckCount = false;
  String? addr;
  String? lock;
  String? doorNo;
  String? readerIp;
  String? ant;
  ReaderEntity? readerEntity;

  // 静态变量
  static final CurrentTaskEntity _singleton = CurrentTaskEntity._internal();

  // 工厂方法
  factory CurrentTaskEntity() {
    return _singleton;
  }

  // 私有构造函数
  CurrentTaskEntity._internal();


  void clear(){
    uid = null;
    uName = null;
    lock = null;
    // isSet = false;
    addr = null;
    doorNo = null;
    readerIp = null;
    needCheckCount = false;
    ant = null;
    offset = 0;
    task = null;
    readerEntity = null;
  }


}